using System;
using System.Collections;
using System.Collections.Generic;

namespace LS.Digitize
{
    public interface ICollectionSerializer: ICompoundSerializer
    {
        ISerializer ElementSerializer  { get; }

        bool ReadICollection(IReader reader, ICollection<object> collection,
            ISerializer elementSerializer, out bool nullCollection);

        void ReadICollectionInto(IReader reader, ICollection collection,
            ISerializer elementSerializer);
    }
    
    public interface ICollectionSerializer<T, TItem>: ICollectionSerializer, ICompoundSerializer<T> where T : ICollection<TItem>
    {
        bool ReadICollection(IReader reader, ICollection<TItem> collection,
            ISerializer elementSerializer, out bool nullCollection);
    }
}